<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <h1>Официанты</h1>        
         <table border="1">
             <tr>
                 <th>ID</th>                
                 <th>Имя</th>
                 <th>Фамилия</th>
                 <th>Отчество</th>                
                 <th>Зарплата</th>
             </tr>
             <c:forEach var="waiter" items="${waiters}"> 
                 <tr>
                     <td>${waiter.id}</td> 
                     <td>${waiter.firstName}</td>
                     <td>${waiter.lastName}</td>
                     <td>${waiter.patronymicName}</td> 
                     <td>${waiter.salary}</td>                      
                     <td border="0">
	                      <form action="editWaiter" name="editWaiter" method="post">
	                      	<input type="hidden" name="id" value="${waiter.id}"/>
				        	<input type="submit" value="Редактировать"/>
				          </form>
			         </td> 
			         <td border="0">
	                      <form action="removeWaiter" name="removeWaiter" method="post">
	                      	<input type="hidden" name="id" value="${waiter.id}"/>
				        	<input type="submit" value="Удалить"/>
				         </form>
			         </td>
                 </tr> 
             </c:forEach>
         </table>       
        <br>         
        <form action="searchWaiter" name="searchWaiter" method="post">
        	<p>Имя:<input type="text" name="firstName"/></p>
        	<p>Фамилия:<input type="text" name="lastName"/></p>
        	<p>Отчество:<input type="text" name="patronymicName"/></p>
        	<input type="submit" value="Поиск"/>
        </form>         
        <br>       
        <form action="addingWaiter" name="addingWaiter" method="post">
        	<input type="submit" value="Добавить официанта"/>
        </form>         
    </body>
</html>